<template>
  <view class="error-page">
    <view class="error-container">
      <image src="/static/images/error-image.png" alt="Error Image" class="error-image"></image>
      <text class="error-title">哎呀！出了点问题</text>
      <view class="error-message">
        <text>很抱歉，服务请求失败了。</text>
        <text>请稍后再试。</text>
      </view>
      <button class="retry-button" @tap="retryRequest">重试</button>
    </view>
  </view>
</template>

<script setup>
const retryRequest = () => {
  // Add retry logic here, you can emit an event to trigger parent component action
};
</script>

<style scoped>
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background-color: #f8f9fa;
}

.error-container {
  text-align: center;
  padding: 20px;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.error-image {
  width: 150px;
  margin-bottom: 20px;
}

.error-title {
  font-size: 24px;
  color: #343a40;
  margin-bottom: 10px;
}

.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 16px;
  color: #6c757d;
  margin-bottom: 20px;
}

.retry-button {
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.retry-button:hover {
  background-color: #0056b3;
}
</style>
